﻿{% load staticfiles %}
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="utf-8">
    <meta name="viewport" content="target-densitydpi=device-dpi,width=device-width, initial-scale=1, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="format-detection" content="telephone=no" />

    <title>大米微信支付</title>
	<!-- 新 Bootstrap 核心 CSS 文件 -->
	<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">

	<!-- 可选的Bootstrap主题文件（一般不用引入） -->
	<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">

	<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
	<script src="http://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>

	<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
	<script src="http://cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
    
	<style>
	body { padding-top: 40px; padding-bottom: 70px;}
	</style>
<body >
<div id="header" class="container text-center">
<nav class="navbar navbar-default navbar-fixed-top">
    <div class="navbar-inner navbar-content-center">
        <p class="text-muted credit" style="padding: 2px;">
            <font size="6">{{ machine_name }}</font><br>({{ machine_id }})
        </p>
    </div>
	
	
</nav>
<div class="container" style="margin-top:50px;">
	<ul class="list-unstyled span7 text-center">
      {% for info in infos %}
	  <li><a href="{{ info.0 }}"><button type="button" class="btn btn-lg btn-danger" style="margin-bottom: 10px;"><font size="22">{{ info.1 }}币</font><br>￥{{ info.2 }}</button></a></li>
      {% endfor %}
	</ul>
</div>
<p class="text-right"><a href='/getbuyrecord/?machine_id={{ machine_id }}'><i class="icon-list"></i>购买记录>></a></p>
<div id="footer" class="container text-center">
<nav class="navbar navbar-default navbar-fixed-bottom">
    <div class="navbar-inner navbar-content-center">
        <p class="text-muted credit" style="padding: 10px;">
            <a href="{{ wx_subscribe_url }}">关注公众号<img style="width:32px;height:20px" src='{% static "coin.jpg" %}'>优惠多多</a>
        </p>
		
    </div>
</nav>

<script>
	function isWeixin(){
		var ua = navigator.userAgent.toLowerCase();
		if(ua.match(/MicroMessenger/i)=="micromessenger") {
			return true;
		} else {
			return false;
		}
	}
/*
	var viewport = document.querySelector("meta[name=viewport]");
	var winWidths=$(window).width();
	var densityDpi=640/winWidths;
		densityDpi= densityDpi>1?300*640*densityDpi/640:densityDpi;
	if(isWeixin()){
		viewport.setAttribute('content', 'width=640, user-scalable=no, target-densityDpi='+densityDpi);
		window.setTimeout(function(){
			viewport.setAttribute('content', 'width=640, user-scalable=no, target-densityDpi='+densityDpi);
		},1000);

	}else{
		viewport.setAttribute('content', 'width=640, user-scalable=no');

		window.setTimeout(function(){
			viewport.setAttribute('content', 'width=640, user-scalable=yes');
		},1000);
	}
*/
	</script>
</body>

</html>
